
import request from '@/utils/request';
// 获取广告列表
export async function advertiseList(data) {
    const res = await request.post('/AdvertiseList', data);
    if (res.status === 0) {
      return res.data;
    }
    return Promise.reject(new Error(res.msg));
  }
export async function delAdvertise(data) {
    const res = await request.post('/DeleteAdvertise', data);
    if (res.status === 0) {
      return res.msg;
    }
    return Promise.reject(new Error(res.msg));
  }
export async function addAdvertise(data) {
    const res = await request.post('/CreateAdvertise', data);
    if (res.status === 0) {
      return res.msg;
    }
    return Promise.reject(new Error(res.msg));
  }
export async function editAdvertise(data) {
    const res = await request.post('/UpdateAdvertise', data);
    if (res.status === 0) {
      return res.msg;
    }
    return Promise.reject(new Error(res.msg));
  }